位置：广告管理
<form  method="post" enctype="multipart/form-data">
<table width="100%">
        <?php
            $contents="";
            $num=1;
           function titleName($name,$dnum,$types){
               if("top"==trim($name))
                   $name="顶部广告";//768X90
               else{
                   $name="右侧广告";//295X158
               }
               if("img"==trim($types))
                   $name.="图片";
               else
                   $name.="连接地址";

               return $name."_".$dnum;
           }
            foreach($advertises as $advertise){
                if("top"==trim($advertise->getName()))
                    $imgstyle="width='700' height='90' title='700X90'";
                else
                    $imgstyle="width='295' height='158' title='295X158'";

                $contents.=$advertise->getAdvertiseId()." ";
                echo "<tr><td style='border-bottom: dashed 1px #ADADAD;'><table width='100%'>
                <td width='100' align='right'>".titleName($advertise->getName(),$num,'img')."：<label></label></td>
                <td width='20%'><input type='text' id='Txt".$advertise->getAdvertiseId()."' name='Txt".$advertise->getAdvertiseId()."' value='".$advertise->getImage()."' />
            <input name='button2' type='button'  onclick=\"getFileUrlFromCKFinder('Txt".$advertise->getAdvertiseId()."','Img".
                        $advertise->getAdvertiseId()."')\" value='浏览' /></td>
                <td width='44%' rowspan='2' align='left'><img id='Img".$advertise->getAdvertiseId()."' src='".$advertise->getImage()."' name='Img".$advertise->getAdvertiseId()."' ".$imgstyle." /></td>
        </tr>
        <tr>
            <td align='right'>".titleName($advertise->getName(),$num,'link')."：</td>
            <td><input type='text' id='link".$advertise->getAdvertiseId()."' name='link".$advertise->getAdvertiseId()."' value='".$advertise->getLink()."' /></td>
          </td></table></tr>";
                $num++;
                if($num==6)
                {
                    $num=1;
                }
            }
            ?>
    <tr>
        <td colspan="3" align="center"><input type="hidden" name="contents" value="<?php echo $contents; ?>"><input type="submit" value="保存">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset"  value="重置">&nbsp;&nbsp;&nbsp;&nbsp;<input type="hidden" name="adverEdit" value="1"></td>
    </tr>
    </table>
</form>
